package com.yt.app.api.vo;

import com.yt.app.api.util.Config;
import com.yt.app.core.model.AppTopic;
import io.swagger.annotations.ApiModelProperty;
import org.springframework.beans.BeanUtils;

/**
 * Description
 * <p>
 * </p>
 * DATE 2017/11/27.
 *
 * @author liujunshi.
 */
public class AppTopicVo extends AppTopic {
    @ApiModelProperty(value = "链接地址", required = true)
    private String link;


    public AppTopicVo(AppTopic appTopic){
        try {
            BeanUtils.copyProperties(appTopic, this);
        }catch(Exception ex){
            ex.printStackTrace();
        }
        this.setLink(Config.appH5Host + "/app/topic/detail?id=" + super.getId());
    }
    @Override
    public String getLink() {
        return link;
    }

    @Override
    public void setLink(String link) {
        this.link = link;
    }
}
